<%@ page import="org.springframework.security.core.context.SecurityContextHolder" %>
<%@ page import="com.archer.security.model.SecurityUser" %>
<%@ page pageEncoding="UTF-8" %>

<!DOCTYPE html>
<%@ include file="/common/taglibs.jsp" %>
<html>
<head>
    <title>
        <%
            SecurityUser securityUser = (SecurityUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
        %>
    </title>
</head>
<body>
<security:authorize access="hasRole('default')">
    <h1 style="color:red;">hello. <%=securityUser.getUsername()%></h1>
</security:authorize>
<a href="<c:url value="/j_spring_security_logout" />" > Logout</a>
</body>
</html>